package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

@TableName("t_class")
public class ClassBean {
    //班级id
    @TableId(value = "pk_classId", type = IdType.AUTO)
    private Integer id;
    //班级名称
    @TableField("c_name")
    private String className;
    //开班时间
    @TableField("c_date")
    private LocalDate date=LocalDate.now();
    //带班老师
    @TableField("c_teacher")
    private String teacher;

    @TableField(exist = false)
    private Integer sum;

    public ClassBean() {
    }

    public ClassBean(String className, String teacher) {
        this.className = className;
        this.teacher = teacher;
    }

    public ClassBean(String className, LocalDate date, String teacher) {
        this.className = className;
        this.date = date;
        this.teacher = teacher;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public String getTeacher() {
        return teacher;
    }

    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }

    public Integer getSum() {
        return sum;
    }

    public void setSum(Integer sum) {
        this.sum = sum;
    }

    @Override
    public String toString() {
        return "ClassBean{" +
                "id=" + id +
                ", className='" + className + '\'' +
                ", date=" + date +
                ", teacher='" + teacher + '\'' +
                ", sum=" + sum +
                '}'+"/n";
    }
}
